package com.brainhealth.customer.domain;

import com.brainhealth.common.enums.CustomerChatStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.brainhealth.common.annotation.Excel;
import com.brainhealth.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 会员信息对象 customer
 * 
 * @author wolong
 * @date 2023-04-27
 */
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long customerId;

    /** 关联会员等级ID */
    @Excel(name = "关联会员等级ID")
    private Long customerLevelId;

    /**
     * 会员等级对象
     */
    private CustomerLevel customerLevel;

    /** 会员成长值 */
    @Excel(name = "会员成长值")
    private Long levelValue;

    /** 筛查端ID */
    @Excel(name = "筛查端ID")
    private Long wechatUserId;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nickName;

    /** 姓名 */
    @Excel(name = "姓名")
    private String customerName;

    /** 用户密码 */
    @Excel(name = "用户密码")
    private String password;

    /** 用户头像 */
    @Excel(name = "用户头像")
    private String customerIcon;

    /** 性别 */
    @Excel(name = "性别")
    private Long sex;

    /** 身份证号 */
    @Excel(name = "身份证号")
    private String userCardId;

    /** 年龄 */
    @Excel(name = "年龄")
    private Long age;

    /** 教育程度 */
    @Excel(name = "教育程度")
    private String education;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String phone;

    /** 是否黑名单 */
    @Excel(name = "是否黑名单")
    private String isBlack;

    /** 微信登录ID */
    @Excel(name = "微信登录ID")
    private String openId;

    /** 所在区域 */
    @Excel(name = "所在区域")
    private String address;

    /** 地址编码 */
    @Excel(name = "地址编码")
    private String addressCode;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** 关联员工vip经理ID */
    @Excel(name = "关联员工vip经理ID")
    private Long vipId;

    /** 聊天状态枚举(0 初始化 1 训练中  2 闲聊 ) */
    @Excel(name = "聊天状态枚举(0 初始化 1 训练中  2 闲聊 )")
    private CustomerChatStatus chatStatus;

    /** 学习库学习时长(单位 秒) */
    @Excel(name = "学习库学习时长(单位 秒)")
    private Long learnTime;

    /** 机构ID */
    @Excel(name = "机构ID")
    private Long mechanismId;

    /** 机构成员ID */
    @Excel(name = "机构成员ID")
    private Long mechanismMemberId;

    /** 积分 */
    private Long score;

    /**
     * 会员当前的训练次数排序
     */
    private Long countSort;

    /**
     * 会员的登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

    /**
     * 会员相关的订单信息
     */
    private List<ExerciseOrder> lstOrder;

    public CustomerLevel getCustomerLevel()
    {
        return customerLevel;
    }

    public void setCustomerLevel(CustomerLevel customerLevel)
    {
        this.customerLevel = customerLevel;
    }

    public void setCustomerId(Long customerId)
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setCustomerLevelId(Long customerLevelId) 
    {
        this.customerLevelId = customerLevelId;
    }

    public Long getCustomerLevelId() 
    {
        return customerLevelId;
    }
    public void setLevelValue(Long levelValue) 
    {
        this.levelValue = levelValue;
    }

    public Long getLevelValue() 
    {
        return levelValue;
    }
    public void setWechatUserId(Long wechatUserId) 
    {
        this.wechatUserId = wechatUserId;
    }

    public Long getWechatUserId() 
    {
        return wechatUserId;
    }
    public void setNickName(String nickName) 
    {
        this.nickName = nickName;
    }

    public String getNickName() 
    {
        return nickName;
    }
    public void setCustomerName(String customerName) 
    {
        this.customerName = customerName;
    }

    public String getCustomerName() 
    {
        return customerName;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setCustomerIcon(String customerIcon) 
    {
        this.customerIcon = customerIcon;
    }

    public String getCustomerIcon() 
    {
        return customerIcon;
    }
    public void setSex(Long sex) 
    {
        this.sex = sex;
    }

    public Long getSex() 
    {
        return sex;
    }
    public void setUserCardId(String userCardId) 
    {
        this.userCardId = userCardId;
    }

    public String getUserCardId() 
    {
        return userCardId;
    }
    public void setAge(Long age) 
    {
        this.age = age;
    }

    public Long getAge() 
    {
        return age;
    }
    public void setEducation(String education) 
    {
        this.education = education;
    }

    public String getEducation() 
    {
        return education;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setIsBlack(String isBlack) 
    {
        this.isBlack = isBlack;
    }

    public String getIsBlack() 
    {
        return isBlack;
    }
    public void setOpenId(String openId) 
    {
        this.openId = openId;
    }

    public String getOpenId() 
    {
        return openId;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }
    public void setAddressCode(String addressCode) 
    {
        this.addressCode = addressCode;
    }

    public String getAddressCode() 
    {
        return addressCode;
    }
    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }
    public void setVipId(Long vipId) 
    {
        this.vipId = vipId;
    }

    public Long getVipId() 
    {
        return vipId;
    }

    public CustomerChatStatus getChatStatus()
    {
        return chatStatus;
    }

    public void setChatStatus(CustomerChatStatus chatStatus)
    {
        this.chatStatus = chatStatus;
    }

    public void setLearnTime(Long learnTime)
    {
        this.learnTime = learnTime;
    }

    public Long getLearnTime() 
    {
        return learnTime;
    }

    public void setMechanismId(Long mechanismId) 
    {
        this.mechanismId = mechanismId;
    }

    public Long getMechanismId() 
    {
        return mechanismId;
    }
    public void setMechanismMemberId(Long mechanismMemberId) 
    {
        this.mechanismMemberId = mechanismMemberId;
    }

    public Long getMechanismMemberId() 
    {
        return mechanismMemberId;
    }

    public Long getScore() {
        return score;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public Long getCountSort()
    {
        return countSort;
    }

    public void setCountSort(Long countSort)
    {
        this.countSort = countSort;
    }

    public Date getLoginTime()
    {
        return loginTime;
    }

    public void setLoginTime(Date loginTime)
    {
        this.loginTime = loginTime;
    }

    public List<ExerciseOrder> getLstOrder()
    {
        return lstOrder;
    }

    public void setLstOrder(List<ExerciseOrder> lstOrder)
    {
        this.lstOrder = lstOrder;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("customerId", getCustomerId())
            .append("customerLevelId", getCustomerLevelId())
            .append("levelValue", getLevelValue())
            .append("wechatUserId", getWechatUserId())
            .append("nickName", getNickName())
            .append("customerName", getCustomerName())
            .append("password", getPassword())
            .append("customerIcon", getCustomerIcon())
            .append("sex", getSex())
            .append("userCardId", getUserCardId())
            .append("age", getAge())
            .append("education", getEducation())
            .append("phone", getPhone())
            .append("isBlack", getIsBlack())
            .append("openId", getOpenId())
            .append("address", getAddress())
            .append("addressCode", getAddressCode())
            .append("ipAddress", getIpAddress())
            .append("vipId", getVipId())
            .append("chatStatus", getChatStatus())
            .append("learnTime", getLearnTime())
            .append("mechanismId", getMechanismId())
            .append("mechanismMemberId", getMechanismMemberId())
            .append("score", getScore())
            .append("countSort", getCountSort())
            .append("loginTime", getLoginTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Customer customer = (Customer) o;
        return Objects.equals(customerId, customer.customerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(customerId);
    }
}
